package com.hera.process.config.service.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hera.base.util.FiltroDTO;
import com.hera.process.config.dao.ProcInstancHistoryDao;
import com.hera.process.config.service.ProcInstanceHistoryService;
import com.hera.process.workflow.domain.ProcInstancHistory;

@Service("procinstancehistorysService")
public class ProcInstancHistoryServiceImpl implements ProcInstanceHistoryService {

	static final Logger logger = Logger.getLogger(UserServiceImpl.class);
	
	@Autowired
	private ProcInstancHistoryDao procinstanchistorydao;
	
	@Override
	public ProcInstancHistory findById(Long id) {
		
		return procinstanchistorydao.findOne(id);
	}

	@Override
	public void update(ProcInstancHistory entity) {
		
		procinstanchistorydao.save(entity);
	}

	@Override
	public void save(ProcInstancHistory entity) {
		
		procinstanchistorydao.save(entity);
	}

	@Override
	public void delete(ProcInstancHistory entity) {
		
		procinstanchistorydao.delete(entity);
	}

	@Override
	public List<ProcInstancHistory> findAll() {
		
		return procinstanchistorydao.findAll();
	}

	@Override
	public List<ProcInstancHistory> findAll(FiltroDTO filtroDTO) {
		
		return procinstanchistorydao.obtenerEntidadesPorFiltros(filtroDTO);
	}

}
